import axios from "axios";

const http = {
  post(url: any, data: any) {
    return axios.post(url, data).then((res) => {
      if (data.data == "data") {
        return res.data.data;
      }
      if (data.data === "data1") {
        return res.data.data1;
      }
      if (data.constructor === Object) {
        return res;
      }
    });
  },
};

export default http;
